var max=0;function AsylumNavLink(parentId,linkId,order,href,linkText,target,width)
{this.linkId=linkId;this.parentId=parentId;this.order=order;this.href=href;this.linkText=linkText;this.target=target;this.width=width;};function AsylumNav(contId,layout,offset)
{this.menuCont=document.getElementById(contId);this.layout=layout;this.offset=(typeof offset=='undefined'?'Right':offset);this.menuItems=new Object();this.clickUnderCreated=false;};AsylumNav.prototype.AddLink=function(parentId,linkId,order,href,linkText,target,width)
{if(typeof this.menuItems[parentId]=='undefined')
{this.menuItems[parentId]=new Object();}
if(typeof width=="undefined")width=false;this.menuItems[parentId][linkId]=new AsylumNavLink(parentId,linkId,order,href,linkText,target,width);if(order>max){max=order;}};AsylumNav.prototype.CreateLevel=function(levelId,idPrefix)
{obj=this;div=document.createElement('div');div.id=idPrefix+levelId;div.levelId=levelId;div.idPrefix=idPrefix;div.className='levelDiv';div.onmouseout=function(e){obj.HideLevel(e);};div.subLevels=new Object();if(levelId!='0')
{div.style.visibility='hidden';div.className+=' subLevel';div.style.position='absolute';}
else
{div.className+=' topLevel';}
if(this.layout=='Horizontal')
{div.style.position='absolute';}
div.style.zIndex=10;if(this.menuCont){this.menuCont.appendChild(div);}
for(i=0;i<=max;i++){for(linkId in this.menuItems[levelId]){if(this.menuItems[levelId][linkId].order==i){linkDiv=document.createElement('div');linkDiv.id='asylumNavLinkDiv'+linkId;linkDiv.linkId=linkId;linkDiv.levelId=levelId;linkDiv.className='linkDiv';if(levelId=="0"){linkDiv.className+=" topLevel";if(this.menuItems[levelId][linkId].width){linkDiv.style.width=this.menuItems[levelId][linkId].width+"px";}}
div.appendChild(linkDiv);navLink=this.menuItems[levelId][linkId];a=document.createElement('a');a.id='asylumNavLink'+linkId;a.linkType='navMenu';a.linkId=linkId;a.levelId=navLink.parentId;a.parentId=navLink.parentId;if(navLink.href==''||navLink.href=='#')
{a.href='#';a.target='';a.style.cursor='default';}
else
{a.href=navLink.href;a.target=navLink.target;}
if(this.layout=='Vertical')
{a.innerHTML=navLink.linkText;}
else
{a.innerHTML=navLink.linkText.split(' ').join('&nbsp;');}
a.onmouseover=function(){obj.ShowLevel(this);};linkDiv.appendChild(a);if(linkId==pageId)
{a.className='activeLink';linkDiv.className+=' activeLink';topLink=this.GetTopLevelLink(navLink);if(typeof this.menuItems[topLink.linkId]!='undefined'&&navLink.levelId!='0')
{try{document.getElementById('asylumNavLink'+topLink.linkId).className+=' activeLink';document.getElementById('asylumNavLinkDiv'+topLink.linkId).className+=' activeLink';}catch(e){}}
if(document.getElementById("clickUnder")!=null)
{this.CreateClickUnder(topLink,true);}}
else
{}
if(typeof this.menuItems[linkId]!='undefined')
{div.subLevels[linkId]=true;}}}}
return div;};AsylumNav.prototype.Construct=function()
{if(this.menuCont==null){return;}
var obj=this;for(levelId in this.menuItems)
{this.CreateLevel(levelId,'asylumNavLevel');}
if(this.layout=='Vertical')
{if(typeof document.getElementById('tplMainSectors')!=null)
{ms=document.getElementById('tplMainSectors');ms.style.height=ms.offsetHeight;}}
else
{this.menuCont.style.height=document.getElementById('asylumNavLevel0').offsetHeight+'px';}
this.CreateBreadCrumbs();};AsylumNav.prototype.CreateClickUnder=function(navLink,active)
{if(typeof doneClickUnder=="undefined"){doneClickUnder=true;}else{return;}
if(document.getElementById("clickUnder")==null)return;obj=this;var linkId;if(this.layout=='Vertical')
{clickDiv=document.createElement('div');clickDiv.id="clickUnder";document.getElementById("clickUnder").appendChild(clickDiv);linkDiv=document.getElementById('asylumNavLinkDiv'+navLink.linkId);linkDiv.appendChild(clickDiv);}
else
{clickDiv=document.getElementById("clickUnder");}
var linkCount=0;for(linkId in this.menuItems[navLink.linkId])
{linkCount++;clickLinkDiv=document.createElement('div');clickLinkDiv.className='clickLinkDiv';clickLink=this.menuItems[navLink.linkId][linkId];txt=document.createTextNode(' ');clickDiv.appendChild(txt);a=document.createElement('a');a.id='asylumNavClickLink'+clickLink.linkId;a.className='clickLink';a.linkType='clickLink';a.linkId=linkId;a.levelId=clickLink.parentId;a.parentId=clickLink.parentId;if(clickLink.href==''||clickLink.href=='#'){a.href='#';a.target='';a.style.cursor='default';}else{a.href=clickLink.href;a.target=clickLink.target;}
if(this.layout=="Vertical"){a.innerHTML=clickLink.linkText;}else if(this.layout=="Horizontal-SubMenu"){if(clickLink.linkText.substring(0,1)==" "){a.innerHTML=clickLink.linkText.split(" ").join("&nbsp;");}else{a.innerHTML=clickLink.linkText;}}else{a.innerHTML=clickLink.linkText.split(" ").join("&nbsp;");}
a.onmouseover=function(){obj.HideAllLevels();obj.ShowLevel(this);};a.onmouseout=function(e){obj.HideLevel(e);};clickLinkDiv.appendChild(a);if(linkId==pageId)
{a.className='activeLink';clickLinkDiv.className+=' activeLink';}
clickDiv.appendChild(clickLinkDiv);txt=document.createTextNode(' ');clickDiv.appendChild(txt);}
if(linkCount==0||active==false)
{clickDiv.className='inactiveClickUnder';}
else
{clickDiv.className='activeClickUnder';}};AsylumNav.prototype.GetTopLevelLink=function(navLink)
{if(navLink.parentId=='0')
{return(navLink);}
while(1==1)
{navLink=this.GetParentLink(navLink);if(typeof navLink.parentId!='undefined')
{if(navLink.parentId=='0')
{break;}}}
return(navLink);};AsylumNav.prototype.GetParentLink=function(navLink)
{var levelId;var linkId;for(levelId in this.menuItems)
{for(linkId in this.menuItems[levelId])
{parNavLink=this.menuItems[levelId][linkId];if(parNavLink.linkId==navLink.parentId)
{return(parNavLink);}}}};AsylumNav.prototype.GetXPos=function(obj)
{var curleft=0;if(obj.offsetParent)
{while(obj.offsetParent&&obj.id!='navMenuCont')
{curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x)
curleft+=obj.x;return curleft;};AsylumNav.prototype.GetYPos=function(obj)
{var curtop=0;if(obj.offsetParent)
{while(obj.offsetParent&&obj.id!='navMenuCont')
{curtop+=obj.offsetTop;obj=obj.offsetParent;}}
else if(obj.y)
curtop+=obj.y;return curtop;};AsylumNav.prototype.ShowLevel=function(el)
{levelId=el.linkId;this.currentLevelId=levelId;window.clearTimeout(this.timeoutId);this.HideSubLevels(el.levelId);if(typeof this.menuItems[levelId]=='undefined')
{return;}
if(el.linkType=='clickLink')
{eP=document.getElementById('asylumNavClickLink'+el.linkId);eL=document.getElementById('asylumNavLevel'+levelId);SwapClass(eL,'subLevel','clickUnderSubLevel');}
else
{eP=document.getElementById('asylumNavLink'+levelId);eL=document.getElementById('asylumNavLevel'+levelId);SwapClass(eL,'clickUnderSubLevel','subLevel');}
if(eP.parentId=='0')
{switch(this.offset)
{case'Right':offsetX=(eP.offsetWidth);offsetY=0;break;case'Left':offsetX=(-eL.offsetWidth);offsetY=0;break;case'Bottom':offsetX=0;offsetY=eP.offsetHeight;eL.style.minWidth=eP.offsetWidth;break;}}
else
{switch(this.offset)
{case'Left':offsetX=(-eL.offsetWidth);offsetY=0;break;default:offsetX=(eP.offsetWidth);offsetY=0;break;}}
pX=this.GetXPos(eP);pY=this.GetYPos(eP);lX=pX+offsetX;lY=pY+offsetY;eL.style.position='absolute';$(eL).css({left:lX,top:lY});eL.style.visibility='visible';};AsylumNav.prototype.GetLevelWidth=function(levelId)
{maxWidth=0;for(linkId in this.menuItems[levelId])
{a=document.getElementById('asylumNavLink'+linkId);thisWidth=a.offsetWidth;if(thisWidth>maxWidth)
{maxWidth=thisWidth;}}
return(maxWidth);};AsylumNav.prototype.HideSubLevels=function(levelId,omitLevelId)
{if(typeof omitLevelId=='undefined')
{omitLevelId='0';}
eL=document.getElementById('asylumNavLevel'+levelId);for(levelId in eL.subLevels)
{this.HideSubLevels(levelId);if(levelId!=omitLevelId)
{eL=document.getElementById('asylumNavLevel'+levelId);eL.style.visibility='hidden';}}};AsylumNav.prototype.HideLevel=function(e)
{window.clearTimeout(this.timeoutId);if(!e)e=window.event;var el=(e.relatedTarget)?e.relatedTarget:e.toElement;var obj=this;var funct=function(){obj._HideLevel(el);};this.timeoutId=window.setTimeout(funct,1000);};AsylumNav.prototype._HideLevel=function(el)
{if(!el||el.id.substr(0,9)!='asylumNav'||(el.id.substr(0,9)=='asylumNav'&&el.style.visibility=='hidden'))
{this.HideAllLevels();}};AsylumNav.prototype.HideAllLevels=function()
{for(levelId in this.menuItems)
{if(levelId!='0')
{eL=document.getElementById('asylumNavLevel'+levelId);if(eL!=null)eL.style.visibility='hidden';}}};AsylumNav.prototype.CreateBreadCrumbs=function()
{if(document.getElementById("breadCrumbs")!=null)
{crumbsCont=document.getElementById("breadCrumbs");crumbsCont.style.display='none';crumbs='';homeLink='';for(levelId in this.menuItems)
{for(linkId in this.menuItems[levelId])
{navLink=this.menuItems[levelId][linkId];if(homeLink=='')
{homeLink='<a href="'+navLink.href+'" target="'+navLink.target+'">'
+navLink.linkText+'</a> &gt; ';}
if(linkId==pageId)
{i=0;parNavLink=this.GetParentLink(navLink);while(typeof parNavLink=='object')
{i++;crumbs='<a href="'+parNavLink.href+'" target="'+parNavLink.target+'">'
+parNavLink.linkText+'</a> &gt; '+crumbs;parNavLink=this.GetParentLink(parNavLink);}
if(i>1)
{crumbsCont.style.display='block';crumbsCont.innerHTML=homeLink+crumbs+'<span class="activeCrumb">'+navLink.linkText+'</span>';}
return(true);}}}}};function RemoveClass(el,className)
{var replaceName=(el.className.match(' '+className)?' '+className:className);el.className=el.className.replace(replaceName,'');};function AddClass(el,className)
{RemoveClass(el,className);el.className+=' '+className;};function SwapClass(el,removeClassName,addClassName)
{RemoveClass(el,removeClassName);AddClass(el,addClassName);};;$(function() {for (var i in tasks) {window.setTimeout(tasks[i], 0);}});function initMenu(){};$(function(){$("#navMenu").navmenu({pageInfo:{"a150141":{"P":0,"ID":158443,"C":150141,"O":0,"U":"http:\/\/www.zamgems.com\/","N":"Home","T":"_top","R":"","RT":"_blank"},"a150142":{"P":150141,"ID":169255,"C":150142,"O":"1","U":"","N":"ZAM Gems","T":"","R":"","RT":"_blank"},"a180885":{"P":150142,"ID":180895,"C":180885,"O":"1","U":"http:\/\/www.zamgems.com\/best-dazzling-sapphiresubies-cats-eyes-alexandrites-diamonds.html","N":"Company History","T":"_top","R":"","RT":"_blank"},"a169232":{"P":150142,"ID":169257,"C":169232,"O":"3","U":"http:\/\/www.zamgems.com\/sale-sri-lankan-gems-jewellery-international-exporter.html","N":"Show Rooms","T":"_top","R":"","RT":"_blank"},"a181723":{"P":169232,"ID":181724,"C":181723,"O":"1","U":"http:\/\/www.zamgems.com\/zam-gems-colombo.html","N":"Colombo","T":"_top","R":"","RT":"_blank"},"a181722":{"P":169232,"ID":181725,"C":181722,"O":"2","U":"http:\/\/www.zamgems.com\/zam-gems-kandy.html","N":"Kandy","T":"_top","R":"","RT":"_blank"},"a181721":{"P":169232,"ID":181726,"C":181721,"O":"3","U":"http:\/\/www.zamgems.com\/zam-gems-cinnamon.html","N":"Cinnamon Grand - Colombo","T":"_top","R":"","RT":"_blank"},"a181720":{"P":169232,"ID":181727,"C":181720,"O":"4","U":"http:\/\/www.zamgems.com\/zam-gems-hilton.html","N":"Hilton Colombo","T":"_top","R":"","RT":"_blank"},"a181719":{"P":169232,"ID":181728,"C":181719,"O":"5","U":"http:\/\/www.zamgems.com\/zam-gems-trans-asia-hotel-colombo.html","N":"Trans Asia Hotel - Colombo","T":"_top","R":"","RT":"_blank"},"a181718":{"P":169232,"ID":181729,"C":181718,"O":"6","U":"http:\/\/www.zamgems.com\/zam-gems-ceylon-continental-hotel.html","N":"Ceylon Continental Hotel - Colombo","T":"_top","R":"","RT":"_blank"},"a181717":{"P":169232,"ID":181730,"C":181717,"O":"7","U":"http:\/\/www.zamgems.com\/zam-gems-bandaranaike-international-airport.html","N":"Air Port - Colombo","T":"_top","R":"","RT":"_blank"},"a182500":{"P":169232,"ID":182504,"C":182500,"O":"8","U":"http:\/\/www.zamgems.com\/zam-gems-conrad-maldives-rangali-island-maldives.html","N":"Rangali Island - Maldives","T":"_top","R":"","RT":"_blank"},"a429467":{"P":169232,"ID":429478,"C":429467,"O":"9","U":"http:\/\/www.zamgems.com\/kanuhura resort - maldives.html","N":"Kanuhura Resort - Maldives","T":"_top","R":"","RT":"_blank"},"a429451":{"P":150142,"ID":429452,"C":429451,"O":"4","U":"http:\/\/www.zamgems.com\/franchise outlets.html","N":"Franchise outlets","T":"_top","R":"","RT":"_blank"},"a427638":{"P":429451,"ID":427639,"C":427638,"O":"1","U":"http:\/\/www.zamgems.com\/doha - qatar.html","N":"Doha - Qatar","T":"_top","R":"","RT":"_blank"},"a181716":{"P":429451,"ID":181731,"C":181716,"O":"2","U":"http:\/\/www.zamgems.com\/zam-gems-ueno-japan.html","N":"Tokyo - Japan","T":"_top","R":"","RT":"_blank"},"a181715":{"P":429451,"ID":181732,"C":181715,"O":"3","U":"http:\/\/www.zamgems.com\/zam-gems-kuala-lumpur-international-airport.html","N":"Airport - Malaysia","T":"_top","R":"","RT":"_blank"},"a181714":{"P":429451,"ID":181733,"C":181714,"O":"4","U":"http:\/\/www.zamgems.com\/zam-gems-berjaya-times-malaysia.html","N":"Kuala Lumpur - Malaysia","T":"_top","R":"","RT":"_blank"},"a204487":{"P":150142,"ID":204489,"C":204487,"O":"5","U":"http:\/\/www.zamgems.com\/international-exporter-gems-jewellery.html","N":"Affiliations","T":"_top","R":"","RT":"_blank"},"a208266":{"P":150142,"ID":208371,"C":208266,"O":"6","U":"http:\/\/www.zamgems.com\/custom-made-jewellery.html","N":"Service &amp; Expertise","T":"_top","R":"","RT":"_blank"},"a341672":{"P":150142,"ID":341733,"C":341672,"O":"7","U":"http:\/\/www.zamgems.com\/gem mining.html","N":"Gem Mining","T":"_top","R":"","RT":"_blank"},"a192135":{"P":150141,"ID":192140,"C":192135,"O":"2","U":"","N":"ZAM Collections","T":"","R":"","RT":"_blank"},"a192136":{"P":192135,"ID":192142,"C":192136,"O":"1","U":"http:\/\/www.zamgems.com\/collection-blue-sapphire.html","N":"True Blue Magic","T":"_top","R":"","RT":"_blank"},"a223875":{"P":192135,"ID":223887,"C":223875,"O":"3","U":"http:\/\/www.zamgems.com\/designer-jewellery-best-pink-sapphires-all-colors.html","N":"Pretty in Pink","T":"_top","R":"","RT":"_blank"},"a223970":{"P":192135,"ID":223980,"C":223970,"O":"4","U":"http:\/\/www.zamgems.com\/designer-jewellery-best-glorious-emeralds.html","N":"Glorious Emeralds","T":"_top","R":"","RT":"_blank"},"a224255":{"P":192135,"ID":224287,"C":224255,"O":"6","U":"http:\/\/www.zamgems.com\/royal-rubies.html","N":"Royal Rubies","T":"_top","R":"","RT":"_blank"},"a224449":{"P":192135,"ID":224487,"C":224449,"O":"7","U":"http:\/\/www.zamgems.com\/quality-best-crisp-diamonds-jewellery.html","N":"Crisp Diamonds","T":"_top","R":"","RT":"_blank"},"a225123":{"P":192135,"ID":225133,"C":225123,"O":"9","U":"http:\/\/www.zamgems.com\/ravishing-rocks.html","N":"Ravishing Rocks","T":"_top","R":"","RT":"_blank"},"a192986":{"P":192135,"ID":192996,"C":192986,"O":"11","U":"http:\/\/www.zamgems.com\/perfect-craftsmanship-unique-creations-cocktail-rings-sri-lanka-asia.html","N":"Festival of Colors","T":"_top","R":"","RT":"_blank"},"a225023":{"P":192135,"ID":225033,"C":225023,"O":"13","U":"http:\/\/www.zamgems.com\/moonstone-mania.html","N":"Moonstone Mania","T":"_top","R":"","RT":"_blank"},"a280572":{"P":192135,"ID":280642,"C":280572,"O":"14","U":"http:\/\/www.zamgems.com\/brighter than sunshine collection.html","N":"Brighter Than Sunshine Collection","T":"_top","R":"","RT":"_blank"},"a205575":{"P":150141,"ID":205576,"C":205575,"O":"4","U":"","N":"Publications","T":"","R":"","RT":"_blank"},"a150144":{"P":205575,"ID":169264,"C":150144,"O":"1","U":"http:\/\/www.zamgems.com\/innovative-jewellery-designs-styles-all-events-sri-lanka.html","N":"Advertisments","T":"_top","R":"","RT":"_blank"},"a205577":{"P":205575,"ID":205590,"C":205577,"O":"2","U":"http:\/\/www.zamgems.com\/press-releases.html","N":"Press Releases","T":"_top","R":"","RT":"_blank"},"a150145":{"P":150141,"ID":169265,"C":150145,"O":"5","U":"http:\/\/www.zamgems.com\/best-selection-sapphires-all-colours.html","N":"Customer Appreciations","T":"_top","R":"","RT":"_blank"},"a150146":{"P":150141,"ID":169266,"C":150146,"O":"6","U":"","N":"Offers &amp; Promotions","T":"","R":"","RT":"_blank"},"a169244":{"P":150146,"ID":169267,"C":169244,"O":"1","U":"http:\/\/www.zamgems.com\/international-exporter-gems-free-jewellary-box.html","N":"Jewellery Box","T":"_top","R":"","RT":"_blank"},"a169243":{"P":150146,"ID":169268,"C":169243,"O":"2","U":"http:\/\/www.zamgems.com\/purchase-stylish-modern-jewellary.html","N":"Loyalty Card","T":"_top","R":"","RT":"_blank"},"a169249":{"P":150141,"ID":169271,"C":169249,"O":"8","U":"http:\/\/www.zamgems.com\/custom-made-manufacture-fine-jewellery-luxurious-jewellery-sir-lanka-asia.html","N":"Contact Us","T":"_top","R":"","RT":"_blank"}},alignment:"Vertical",animate:0})});